/*
 *  DPMacros.h
 *  HigherOrderMessaging
 *
 *  Created by Ofri Wolfus on 03/11/06.
 *  Copyright 2006 Ofri Wolfus. All rights reserved.
 *
 */

#ifndef _DP_MACROS
#define _DP_MACROS

//
//	Compatibility with C*
//
#if !defined(__OBJC2__)
#define __OBJC2__ 0
#endif

//
//  Platform specific defs for externs
//

//
// For MACH
//

#if defined(__MACH__)

#ifdef __cplusplus
#define DP_EXTERN		extern "C"
#define DP_PRIVATE_EXTERN	__private_extern__
#else
#define DP_EXTERN		extern
#define DP_PRIVATE_EXTERN	__private_extern__
#endif

//
// For Windows
//

#elif defined(WIN32)

#ifndef _CKBUILDING_DP_DLL
#define _CKWINDOWS_DLL_GOOP	__declspec(dllimport)
#else
#define _CKWINDOWS_DLL_GOOP	__declspec(dllexport)
#endif

#ifdef __cplusplus
#define DP_EXTERN		extern "C" _CKWINDOWS_DLL_GOOP
#define DP_PRIVATE_EXTERN	extern
#else
#define DP_EXTERN		_CKWINDOWS_DLL_GOOP extern
#define DP_PRIVATE_EXTERN	extern
#endif

//
//  For Solaris
//

#elif defined(SOLARIS)

#ifdef __cplusplus
#define DP_EXTERN		extern "C"
#define DP_PRIVATE_EXTERN	extern "C"
#else
#define DP_EXTERN		extern
#define DP_PRIVATE_EXTERN	extern
#endif

#endif

//
//  Static Inline
//
#if !defined(DP_STATIC_INLINE)
#if defined (__GNUC__) && (__GNUC__ == 4)
#define DP_STATIC_INLINE static __inline__ __attribute__((always_inline))
#else
#define DP_STATIC_INLINE static __inline__
#endif
#endif

//
//  Extern Inline
//
#if !defined(DP_EXTERN_INLINE)
#define DP_EXTERN_INLINE extern __inline__
#endif

#endif // _DP_MACROS
